package com.itheima.mm.service.impl;

import com.itheima.mm.dao.CompanyDao;
import com.itheima.mm.pojo.Company;
import com.itheima.mm.service.ICompanyService;
import com.itheima.mm.utils.SqlSessionFactoryUtils;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.util.List;

/**
 * 包名:com.itheima.mm.service
 * 作者:Leevi
 * 日期2020-01-16  11:07
 */
@Service
public class CompanyService implements ICompanyService {
    @Autowired
    private CompanyDao companyDao;//项目以为spring核心容器中没有companyDao的对象
    @Override
    public List<Company> findAll() throws IOException {
        return companyDao.findAll();
    }
}
